package com.numbfish;

import ch.qos.logback.core.net.ssl.SSL;
import org.junit.jupiter.api.Test;
import org.redisson.Redisson;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;

public class Demo01 {
    @Test
    public void test1(){
        Config config = new Config();

        //config.useClusterServers()
                // use "rediss://" for SSL connection
                //.addNodeAddress("redis://127.0.0.1:6379");
        config.useSingleServer().setAddress("redis://127.0.0.1:6379");
        // Sync and Async API
        RedissonClient redisson = Redisson.create(config);
        // java.util.concurrent.ConcurrentMap

        // java.util.concurrent.locks.Lock

        RLock lock = redisson.getLock("myLock");


    }

    @Test
    public void test2(){
    }

}
